home *** CD-ROM | disk | FTP | other *** search
/ MacHack 1996 / MacHack 1996.toast / Hacks / Hacks ’92 / HyperInitMaker... / Heizer Working Models / WindowScript WM.sea / WindowScript™.Demo ƒ / WindowScript™ 1.0 Working Model / stack_-1.xml < prev    next >
Extensible Markup Language  |  1992-04-29  |  30KB  |  34 lines

  1. <?xml version="1.0" encoding="utf-8" ?>
  2. <!DOCTYPE stack PUBLIC "-//Apple, Inc.//DTD stack V 2.0//EN" "" >
  3. <stack>
  4.     <name>in.0 Working Model</name>
  5.     <id>-1</id>
  6.     <cardCount>15</cardCount>
  7.     <cardID>2128</cardID>
  8.     <listID>4894</listID>
  9.     <cantModify><false /></cantModify>
  10.     <cantDelete><false /></cantDelete>
  11.     <cantAbort><false /></cantAbort>
  12.     <cardSize>
  13.         <width>384</width>
  14.         <height>264</height>
  15.     </cardSize>
  16.     <script>on barChanges wif w="I" then put "Window‚Ķ" after menu "Edit" with menuMsg "doWindow"else if w="R" thenif there is a menuitem "Window‚Ķ" of menu "Edit"then delete menuitem "Window‚Ķ" of menu "Edit"end ifend barChangeson reset wglobal PPif w="menubar" thensend the params to HyperCardif PP‚â†"" thenbarChanges "I"end ifelse pass resetend reseton StopAlert m,bif b="" then put "OK" into bget WindowScript("Stop",m,b)end stopAlerton bonk wglobal gLastBeepput w into gLastBeepbeepend bonkon closeStackput the windows into wListrepeat with x=number of lines in wList down to 1get wsGet(line x of wList,xStackName)if it‚â†"" and it is in long name of the targetthen close window line x of wListend repeatpass closeStackend closeStackon suspendStackput the windows into wListrepeat with x=number of lines in wList down to 1get wsGet(line x of wList,xStackName)if it‚â†"" and it is in long name of the target thenwsSet line x of wList,"VISIBLE",FALSEouchbb 0,line x of wList,0,line x of wList,"SUSPEND"end ifend repeatpass suspendStackend suspendStackon resumeStackput the windows into wListrepeat with x=number of lines in wList down to 1get wsGet(line x of wList,xStackName)if it‚â†"" and it is in long name of the targetthen wsSet line x of wList,"VISIBLE",trueend repeatpass resumeStackend resumeStackon installWS vglobal PP,CR,PT,BW,BM,WSSif PP="" thenput return into CRput "Property Picker" into PPput "BigMessage" into BMif (word 1 of screenInfo(rect of cd window) < 16) then put "BW" into BW else put "" into BWput "wsTools"&BW into PTput line 1 of the stacksInUse into WSSget WindowScript("wsSplash")set cursor to busybarChanges "I"makePalsif BW‚â†"" thenmenuSet "Tools",1,"NAME","CursorToolsBW,3,1,0,V"menuSet "Tools",2,"NAME","ToolsDividerBW"menuSet "Tools",3,"NAME","ItemToolsBW,3,5,0,V"end ifclose window "wsSplash"if v=true then bmput "WindowScript Installed."end ifend installWSon deinstallWSglobal PP,PT,BM,typeShownif PP‚â†"" thenget the windowsset cursor to watchrepeat with l=1 to number of lines in itif wsGet(line l of it,"xStackName")‚â†"" then close window (line l of it)end repeatbarChanges "R"if there is a window PP then close window PPif there is a window PT then close window PTif there is a window BM then close window BMput "" into PPput "" into PTput "" into typeShownelse bonk the paramsend deinstallWSon makePalsglobal PP,PT,typeShown,CR,PPID,ppVis,ptVis,BW,BMif there is no window PP thenif bw‚â†"" thenget "_Rect: 500,0,500,0"&CRput CR&"i90"&it&"i91"&it&"i92"&it&"i0_Menubar: BigBroBar"&BW into initelse put "" into initget ResourceList("FOND","Name")sort itset cursor to busyget WindowScript(PP&init,it)put word 1 of it into ppIDset cursor to busyget screenRect()set i0_TopLeft of window pp to ((item 3 of it) - (i0_width of window PP) - 5 )&","&((item 2 of it) + 34 )put "" into typeShownput true into ppVismenuSet "Objects",1,"NAME","Show Info"end ifif there is no window PT thenget WindowScript(PT)set i0_topLeft of window PT to globalPt(topleft of window "tools",0,0)put true into ptVisset cursor to busyend ifif there is no window BM thenget WindowScript(BM&CR&"i0_Menubar: BigBroBar"&BW)set i0_topLeft of window BM to globalPt(topleft of window "message",-8,0)if msg is visible then hide msgset cursor to busyend ifend makePalsfunction globalPt p1,offx,offyreturn (item 1 of p1+left of cd window+offx)&","&(item 2 of p1+top of cd window+offy)end globalPton chooseCurs n,iglobal PT,BB,PPSet i3_Selection of window PT to 0Set i1_Selection of window PT to imenuSet "Tools",1,"SELECTION",imenuSet "Tools",3,"SELECTION",0Set EditMode of window BB to nend chooseCurson chooseTool wglobal PT,BB,PP,BMif BigBrother of window BB=false thenmenuSet "Tools",1,"SELECTION",0menuSet "Tools",3,"SELECTION",0else if w="Select" then chooseCurs "Select",3else if w="Play" then chooseCurs "Play",1else if w="" thenget editmode of window BBif it="PLAY" then chooseCurs "Play",1 else chooseCurs "Select",3else if w is an integer thenif w=1 then chooseCurs "Play",1else if (w<=3) then chooseCurs "Select",3 elseif (w=12 and not HasQT()) then bmPut "Caution: QuickTime not installed."Set i3_Selection of window PT to w-3Set i1_Selection of window PT to 0Set EditMode of window BB to "MAKE"menuSet "Tools",1,"SELECTION",0menuSet "Tools",3,"SELECTION",w-3end ifend ifend chooseToolon bmPut wglobal BM,CRwsSet BM,"PROPERTIES","i1_TEXT:"&scrunch(w)&CR&"i0_VISIBLE:TRUE"&CR&"i0_BRINGTOFRONT"&CR&"i1_SELECTION:0-32767"end bmPuton showHidePals showItglobal PP,PT,BB,ppVis,ptVisif showIT=TRUE and wsGet(BB,"BigBrother")‚â†TRUE then put false into showItif showIt=true thenmakePalswsSet PP,"VISIBLE",ppViswsSet PT,"VISIBLE",ptVishide window "tools"else if showIt=false thenwsSet PT,"VISIBLE",FALSEwsSet PP,"VISIBLE",FALSE-- if ptVis then show window "tools"end ifmenuSet "Objects","Grid","CHECKMARK",wsGet(BB,"SNAP")menuSet "Tools,Objects,Font,Style,Color",0,"DISABLED",(showIt‚â†true)end showHidePalsfunction chk4Dup w,bfif there is no window w then return falseif bf then get "It will be brought to the front." else get ""StopAlert "A window named ‚Äú"&w&"‚Äù is already open."&&it,"Cancel"if bf then send "BRINGTOFRONT" to window wreturn trueend chk4Dupon doWindow init,skglobal BB,CR,BW,WSSif sk is empty then put value of word 2 of long name of this stack into skCreateResFork (sk)if the optionKey=down then put ResourceList(sk,"ljb ") into lelse put ResourceList(sk,"LENS") into lsort lput WindowScript("windows"&CR&init,l,1,l="",l="") into whatUpput line 1 of the stacks into theStackput line 2 of whatUp into textChkput line 3 to 999 of whatUp into wListget line 1 of whatUpif it="New" then doNewelse if it="Open" thenrepeat with l=1 to number of lines in wListput line l of wList into theLENSif chk4Dup(theLENS,true) then next repeatput LENS2Text(sk,theLENS) into lensTextif lenstext="" then next repeatif textChkthen get WindowScript("TextWindow"&CR&"i0_Menubar: BigBroBar"&BW,theLENS,theLENS,sk,lensText)else get WindowScript("BigBrother"&CR&lensText&CR&"xOrgName: "&theLENS&CR&"xStackName: "&sk)end repeatelse if it="Delete" thenrepeat with l=1 to number of lines in wListput line l of wList into theLENSget WindowScript("Caution","Really delete window ‚Äú"&theLens&"‚Äù?","Delete")if it="" then exit doWindowif there is a window theLENS then close window theLENSresDelete sk,"LENS",theLENSif the result‚â†"" then StopAlert the resultend repeatend ifend doWindowon doNewglobal BB,CRput "Untitled" into NewNameput CR & resourcelist("","LENS","Name") & CR & the windows into ngListput 1 into cntrepeat foreverif (CR & newName & CR) is in ngList thenadd 1 to cntput "Untitled"&&cnt into NewNameelse exit repeatend repeatget WindowScript("BigBrother"&CR&"New"&CR&"i0_name: "&NewName&CR&"xOrgName:"&CR&"xDirt: TRUE"&CR&"xStackName: "&(line 1 of the stacks))end doNewon doMsgglobal BM,BBget visible of window BMset visible of window BM to (not it)if it then wsSet BB,"FOCUS",wsGet(BB,"FOCUS") else send "BRINGTOFRONT" to window BMend doMsgon doSplashget WindowScript("wsSplash")wait until the mouse=downclose window "wsSplash"end doSplashon doDefaultglobal BBif BigBrother of window BB=truethen put wsDescribe(BB) into theDataelse put i1_text of window BB into theDataget Text2LENS(xStackName of window BB,"New",theData,"Overwrite","ljb ")if it‚â†"" and it is not an integer thenStopAlert "Trouble saving default:"&return&itexit doDefaultend ifend doDefaulton makeClean wif there is no window w then return trueget wsGet(w,"DIRTY")if it > 0 thenwsSet w,it,"DIRTY",falsereturn wsGet(w,it,"DIRTY")else return trueend makeCleanon doSave toFglobal BBif bb is empty then exit doSaveset cursor to watchif BigBrother of window BB=truethen put wsDescribe(BB) into theDataelse put i1_text of window BB into theDataif toF="" thenput xStackName of window BB into skput xOrgName of window BB into theNameelseput toF into skput "" into theNameend ifif the optionKey=downthen get Text2LENS(sk,BB,theData,"Overwrite","ljb ")else if theName‚â†"" and theName‚â†BBthen get Text2LENS(sk,BB,theData)else get Text2LENS(sk,BB,theData,"Overwrite")if it‚â†"" and it is not an integer thenStopAlert "Trouble saving LENS:"&return&itexit doSaveend ifset xDirt of window BB to FALSEset xOrgName of window BB to BBend doSaveon doSaveAsanswer file "Save copy of window into:" of type STAKif it‚â†"" then doSave itend doSaveAson doDeletedoWindow "DefaultItem: Delete"&return&"WindowList_DoubleClickItem: Delete"end doDeleteon doPrintglobal BBif BigBrother of window BB=true thensend "snapShot" to window BBPrintWindow BB,",Window,","Printed at ‚Ć  on: ‚àÇ,,Page œÄ,","0.5,1,0.5,0.5",".25,.25",1if the result‚â†"" and "canceled" is not in the result thenStopAlert the resultend ifelseget i1_text of window BBPrintText it,",Window,","Printed at ‚Ć  on: ‚àÇ,,Page œÄ,","0.5,1,0.5,0.5",".25,.25",1if the result‚â†"" and "canceled" is not in the result thenStopAlert  the resultend ifend ifend doPrinton doAlign dirglobal BBif editmode of window BB‚â†"select" then exit doAlignwsSend BB,"ALIGN"&dirend doAlignon doSelectAll fromWhoglobal BB,PPif fromWho="text" thenwsSet BB,1,"SELECTION","0-32767"else if fromWho=PP thenput wsGet(PP,FOCUS) into ppFocuswsSet PP,ppFocus,"SELECTION","0-32767"elseput wsGet(BB,EDITMODE) into theModeif theMode="PLAY" thenput wsGet(BB,FOCUS) into bbFocuswsSet BB,bbFocus,"SELECTION","0-32767"elseif theMode‚â†"SELECT" then ChooseTool "SELECT"wsSet BB,"SELECTION","0-32767"end ifend ifend doSelectAllon doSaveScript scrWdglobal itemShown,typeShownif confirmRef(scrWd)‚â†true then return "NG"put xOwnerID of window scrWd into oIDput xOwnerNumber of window scrWd into oNumberget theScript_TEXT of window scrWdwsSet oID,oNumber,"SCRIPT",itSet xOldScript of window scrWd to itif gWindow=wsGet(oID,"NAME") and itemShown=oNumber and typeShown="Script"then set4item itemShownwsSet oID,"xDirt",TRUEend doSaveScripton doGridglobal BBwsSet BB,"SNAP",not wsGet(BB,"SNAP")menuSet "Objects","Grid","CHECKMARK",wsGet(BB,"SNAP")end doGridon doDupglobal BBif editmode of window BB‚â†"select" then exit doDupset properties of window BB to wsDescribe(BB,-99)set4item -2,TRUEDirtyend doDupon doFartherglobal BBif editmode of window BB‚â†"select" then exit doFartherget i0_selection of window BBif it="" thenbonk the paramsexit doFartherend ifrepeat with x=1 to number of items in itput item x of it into theItemif theItem > 1then wsSet BB,theItem,"NUMBER",theItem-1end repeatset4item -1,TRUEDirtyend doFartheron doCloserglobal BBif editmode of window BB‚â†"select" then exit doCloserget i0_selection of window BBif it="" thenbonk the paramsexit doCloserend ifput numberofitems of window BB into itemCountrepeat with x=number of items in it down to 1put item x of it into theItemif theItem < itemCountthen wsSet BB,theItem,"NUMBER",theItem+1end repeatset4item -1,TRUEDirtyend doCloserfunction NewItemDesc r,tglobal BB,CR,PTif t="" then if there is a window PT then put i3_Selection of window PT into tif t="" thenbonk the paramsreturn ""end ifget ""if t =1 thenget wsGet(BB,itemList)put offset("PUSH",it) into dif d=0 then get "Name:OK"&CR&"DefaultItem:TRUE"&CR&"AutoClose:TRUE"else if offset("PUSH",char d+1 to 32000 of it)=0then get "Name:Cancel"&CR&"CancelItem:TRUE"&CR&"AutoClose:TRUE"else get "Name:Untitled"else if t is in "2,3,7,8,9" then get "Name:Untitled"else if t=4 then get "Text:Label"else if t=5 then get "Text:Text"else if t=6 then get "LockText:FALSE"return ("ItemType: "&item t of "PUSH,RAD,CHK,LBL,TEXT,TEXT,ICON,PICT,MOOV,LIST,POP,CNTL,BOX,RBOX,LINE,MOOV") ¬¨&CR&it&CR&"Rect: "&rend NewItemDescon set4Item i,newListglobal typeShown,itemShown,PPID,BBset cursor to watchif PPID="" then makePalsput ppid into theIDput typeShown into oldTypeget wsGet(BB,"ID")setPicker it,theID,i,newList,oldTypeend set4Itemon ckSkif stackspace()<3036 thenbonk the paramsexit ckSkend ifend ckSkon ouch wID,wName,i,nm,vckSkglobal typeShown,itemShown,BB,PP,CR,ppRect,ppTL,ppVis,BW,gLastWd,PPIDif nm="TextSize" and v="Other‚Ķ" thenput wsGet(BB,itemShown,"TEXTSIZE") into vask "Size?" with vif it‚â†"" then put it into vput v into vset TextSize_SELECTIONTEXT of window PP to vend ifif i=-1 thendoBBMenu nm,v,PPelse if i=0 thenif v="CloseBox" thenwsSet PP,"VISIBLE",FALSEput false into ppVisouch 0,PP,2,"HideProp"return "NG"else if v="Close" thenput "" into PPIDend ifelse if nm="ItemList" thenget i4_Selection of window PPif it="" then set4item -1 elseif it‚â†v then set properties of window BB to "i"&(v-1)&"_Number:"&&(it-1)set i0_selection of window BB to (it-1)set4item (IT-1)end ifexit ouchelse if i=2 and "show" is in nm thenif width of window PP < 105 then put rect of window PP into ppRectwsSet PP,"PROPERTIES","i2_NAME:HideProp"&BW&CR&"i0_WIDTH:366"&CR&"VISIBLE:TRUE"&CR&"BRINGTOFRONT"put true into ppVisset4Item -3put topLeft of window PP into ppTLmenuSet "Objects",1,"NAME","Hide Info"exit ouchelse if i=2 and "hide" is in nm thenif topLeft of window PP = ppTL then get "i0_Rect:"&ppRect else get "i0_width:100"wsSet PP,"PROPERTIES",it&CR&"i2_NAME:ShowProp"&BWset4Item -3wsSet BB,"FOCUS",wsGet(BB,FOCUS)menuSet "Objects",1,"NAME","Show Info"exit ouchelse if nm="Zoomer" thenif width of window PP < 105then ouch 0,PP,2,"ShowProp"else ouch 0,PP,2,"HideProp"else if nm="Name" thenif itemShown=0 thenif v="" then return "NG"if v‚â†BB then if chk4dup(v,false) then return "NG"wsSet BB,ItemShown,nm,vmenuSet "Go",BB,"NAME",vif gLastWd=BB then put v into gLastWdput v into BBelse wsSet BB,ItemShown,nm,vDirtySet I4_TextOfSelection of window PP to (char 1 to 4 of(wsGet(BB,itemShown,"ItemType")&" "))&&wsGet(BB,itemShown,"Name")if typeShown="ICON" or TypeShown="PICT" or TypeShown="ICN#" thenset id_selectiontext of window pp to wsGet(BB,itemShown,"ID")end ifelse if nm="Choose‚Ķ" thenanswer file ""if it‚â†"" thenwsSet BB,ItemShown,"FILE",itwsSet PP,"FILE","TEXT",itDirtyend ifelse if nm="TEXT" thenwsSet BB,ItemShown,nm,wsGet(PP,i,"TEXT")Dirtyelse if nm="Script" thenset cursor to watchformatscript wsGet(PP,i,"HANDLE")wsSet BB,ItemShown,nm,wsGet(PP,i,"TEXT")Dirtyelse if itemShown‚â†"" thenwsSet BB,ItemShown,nm,vDirtyend ifif nm="Plain" thenif v=truethen set properties of window pp to "Bold_Hilite:FALSE"&CR&"Italic_Hilite:FALSE"&CR&"Underline_Hilite:FALSE"&CR&"Outline_Hilite:FALSE"&CR&"Shadow_Hilite:FALSE"else Set Plain_Hilite of window PP to TRUEelse if nm is in "Bold,Italic,Underline,Outline,Shadow" thenSet Plain_Hilite of window PP to wsGet(BB,ItemShown,"Plain")else if nm="FinderIcon" thenset4item -3,trueelse if nm="ID" or nm="Text" thenSet Name_Text of window PP to wsGet(BB,itemShown,"Name")Set I4_TextOfSelection of window PP to (char 1 to 4 of(wsGet(BB,itemShown,"ItemType")&" "))&&wsGet(BB,itemShown,"Name")else if nm="Number" thenset i4_Text of window pp to itemList of window BBelse if nm="AutoSize" and v=TRUE thenif GrowItem of window BB=itemShown thenset GrowItem of window BB to 0set GrowItem_Hilite of window PP to FALSEend ifelse if nm="GrowItem" and v=TRUE thenif AutoSize of window BB=TRUE thenwsSet BB,ItemShown,"AUTOSIZE",FALSEset AutoSize_Hilite of window PP to FALSEend ifelse if nm="Script‚Ķ" thenif v=nm then Script4Item BB,itemShown else setFlap 88, (not v)else if nm="Balloon‚Ķ" thenif v=nm then Balloon4Item BB,itemShown else setFlap 89, (not v)else if nm="Params‚Ķ" thenif v=nm then inOrOut "Params","Param" else setFlap 96, (not v)else if nm="Result‚Ķ" thenif v=nm then inOrOut "Result","Line" else setFlap 97, (not v)else if nm="Menus‚Ķ" thenif v=nm then get WindowScript("Log",resourceList("","MENU","BOTH"),"The Menus property is a list of menu ids or names separated by returns. Use above for reference.","Menus")else setFlap 98, (not v)else if "Dialog,Window,Windoid" contains nm thenget "_Disabled:"&(wsGet(BB,"Style")="Dialog")wsSet PP,"Properties","i36"&it&CR&"i37"&it&CR&"i38"&it&CR&"i36_HILITE:"&wsGet(BB,"HasCloseBox")&CR&"i37_HILITE:"&wsGet(BB,"HasZoomBox")&CR&"i38_HILITE:"&wsGet(BB,"HasGrowBox")else if nm="Style" thenif typeShown="LIST" and last char of v="‚Ķ" thenget WindowScript(v,wsGet(BB,ItemShown,"STYLEINFO"))if it‚â†"" then wsSet BB,ItemShown,"STYLEINFO",line 2 of itend ifelse if i=91 or i=92 thenif i=91 then get "BLACKCOLOR" else get "WHITECOLOR"if v=257 then put answerColor("",wsGet(BB,itemShown,it)) into vif v‚â†"" thenwsSet BB,ItemShown,it,vwsSet PP,i,"WHITECOLOR",vwsSet PP,i,"TEXT",","&v&CR&"Other‚Ķ"end ifend ifend ouchon setFlap i,vglobal PP,CRget "_Hilite:FALSE"&CRset properties of window pp to "i88"&it&"i89"&it&"i96"&it&"i97"&it&"i98"&it&"i"&i&"_HILITE:"&vset4item -3if v=true then wsSet PP,95,"SELECTION",0end setFlapon wsError wID,wName,jNo,jNm,jVglobal CRif the optionKey is down then exit wsErrorget WindowScript("Script Error",wID&CR&wName&CR&jNo&CR&jNm&CR&jV,Crawl())end wsErrorfunction newScript tglobal CRput " wdID,wdName,objNo,objName,objValue" into pif t="WIND" thenput CR&"else if objValue="&quote into altget "--on windowEvent"&&p&CR ¬¨&CR&"if objValue="&quote&"Open"&quote&" then "&CR ¬¨&alt&"Close"&quote&" then "&CR ¬¨&alt&"Suspend"&quote&" then "&CR ¬¨&alt&"Resume"&quote&" then "&CR ¬¨&alt&"CloseBox"&quote&" then "&CR ¬¨&alt&"ZoomBox"&quote&" then "&CR ¬¨&alt&"GrowBox"&quote&" then "&CR ¬¨&alt&"TitleBar"&quote&" then "&CR ¬¨&CR&"end if"&CR&CR&"--end windowEvent"return itelse if t="TEXT" thenreturn "--on closeField"&&p&CR&CR&"--end closeField"else if t is in "BOX,RBOX,LINE,LBL" thenreturn "--on mouseDown"&&p&CR&CR&"--end mouseDown"else return "--on mouseUp"&&p&CR&CR&"--end mouseUp"end newScripton wsBBError b,c,d,e,fwsError b,c,d,e,fend wsBBErroron doBBMenu nm,v,fromWhoglobal PT,PP,BB,ptVisMakeClean BBMakeClean PPif nm=tools thenif v=512 thenset topleft of window PT to item 1 to 2 of menuitem 4 of menu nmwsSet PT,"VISIBLE",TRUEput true into ptViselse chooseTool velse if v="About WindowScript‚Ķ" then doSplashelse if nm=numtochar(20) and v=1 then doSplashelse if v="New Window" then doNewelse if v="Open Window‚Ķ" then doWindowelse if v="Close Window" then wsSend bb,"Close"else if v="Delete Window‚Ķ" then doDeleteelse if v="Save Window" then doSaveelse if v="Save Window Into‚Ķ" then doSaveAselse if v="Save As Default" then doDefaultelse if v="Import Resource‚Ķ" then doInReselse if v="Page Setup‚Ķ" then doMenu "Page Setup..."else if v="Print Window‚Ķ" then doPrintelse if v="Quit HyperCard" then doMenu "Quit HyperCard"else if v="Duplicate" then doDupelse if v="Select All" then doSelectAll fromWhoelse if v="Message" then doMsgelse if v="Next Window" then doMenu "Next Window"else if v="Show Info" then ouch 0,PP,2,"ShowProp"else if v="Hide Info" then ouch 0,PP,2,"HideProp"else if v="Bring Closer" then doCloserelse if v="Send Farther" then doFartherelse if nm="Go" thenget wsGet(v,xStackName)if it‚â†"" and it‚â†line 1 of the stacks thengo stack itwsSet v,"VISIBLE",TRUEend ifsend "BringToFront" to window velse if nm="Font" then doFont velse if nm="style" then doStyle velse if nm="Color" then doColor velse if word 1 of v="Align" then doAlign (word 2 of v)else if v="Grid" then doGridend doBBMenuon doFont nmglobal BBget editmode of window BBif it="SELECT" thenget i0_Selection of window BBrepeat with x=1 to number of items in itwsSet BB,(item x of it),"TEXTFONT",nmend repeatelse if it="PLAY" thenset SELECTIONFONT of window BB to nmend ifend doFonton doStyle nmglobal BBget editmode of window BBif nm= "Other..." thenask "FontSize: "if it‚â†"" then doStyle it else exit doStyleelse if it="SELECT" thenget i0_Selection of window BBrepeat with x=1 to number of items in itif nm is an integer then wsSet BB,(item x of it),"TEXTSIZE",nm else wsSet BB,(item x of it),nm,TRUEend repeatDirtyelse if it="PLAY" thenif nm is an integerthen set SELECTIONSIZE of window BB to nm elseset SELECTIONSIZE of window BB to -1wsSet BB,wsGet(BB,"FOCUS"),nm,TRUEend ifDirtyend ifend doStyleon doColor nmglobal BBget editmode of window BBif it="SELECT" thenif the optionKey=down thenif nm=257 then put answercolor("","-1,-1,-1") into nmput "WHITECOLOR" into pelseif nm=257 then put answercolor("") into nmput "BLACKCOLOR" into pend ifif nm‚â†empty thenget i0_Selection of window BBrepeat with x=1 to number of items in itwsSet BB,(item x of it),p,nmend repeatend ifelse if it="PLAY" thenif nm=257 then put answercolor("") into nmif nm‚â†"" then set SELECTIONCOLOR of window BB to nmend ifend doColoron ouchBB wID,wName,i,nm,vglobal itemShown,BB,PP,PT,CR,gLastWd,BM,PPIDif PPID="" then MakePalsif i= -1 thendoBBMenu nm,vexit ouchBBelse if v="Select" thenSet4Item iexit ouchBBelse if v="Edit" thenif the commandKey=down then Script4Item BB,i elseset i4_selection of window PP to i+1ouch 0,PP,2,"ShowProp"end ifelse if v="Drag" thenif i=itemShown then set TopLeft_Text of window PP to wsGet(BB,itemShown,"TopLeft")Dirtyexit ouchBBelse if v="Resize" thenif i=itemShown thenset properties of window PP ¬¨to "TopLeft_Text: "&wsGet(BB,itemShown,"TopLeft")¬¨&CR&"Height_Text: "&wsGet(BB,itemShown,"Height")¬¨&CR&"Width_Text: "&wsGet(BB,itemShown,"Width")Dirtyend ifelse if v="Resume" thenput wName into gLastWdif wName‚â†BB thenput wName into BBSet4Item -1,TRUEChooseToolend ifmenuSet "Go",wName,"CHECKMARK",TRUEshowHidePals TRUEelse if v="Suspend" thenmenuSet "Go",wName,"CHECKMARK",FALSEif gLastWd="" or wName=gLastWd thenshowHidePals FALSEput "" into BBend ifput "" into gLastWdelse if v="Cut" thenget wsDescribe(wName,-999)send "DELETESELECTED" to window wNameSet4Item  -2,TRUEDirtyelse if v="Clone" thenset Properties of window BB to wsDescribe(wName,-9999)Set4Item -2,TRUEDirtyelse if v="Copy" thenset cursor to watchget wsDescribe(wName,-999)else if v="Paste" thenclip2resource (value of word 2 of long name of this stack)put the result into gClipif word 2 of gClip is not an integer thenif gClip="" then get "Nothing to paste." else get "Trouble pasting: "&&gClipStopAlert itelseif word 1 of gClip="TEXT"then if word 3 of gClip="ItemType:" then put char 8 to 32767 of gClip into p2Setelse put "ItemType: TEXT"&CR&"TEXT: "&scrunch(char 8 to 32767 of gClip)&CR&"AdjustSize" into p2Setelse put "ItemType: "&(word 1 of gClip)&CR&"ID: "&(word 2 of gClip)&CR&"AdjustSize" into p2Setset Properties of window BB to p2SetSet4Item -2,TRUEChooseTool "SELECT"Dirtyend ifelse if v="Clear" thensend "DELETESELECTED" to window wNameSet4Item -1,TRUEDirtyelse if word 1 of v="Make" thenget NewItemDesc(word 2 of v)if it‚â†"" thenset Properties of window BB to it&CR&"AdjustSize"if there is a window PT then ChooseTool "SELECT"DirtySet4Item -2,TRUEend ifelse if v="Open" thenget menuGet("Go",1,"NAME")menuSet "Go",1,"NAME",wName&CR&itelse if v="Close" thenif xDirt of window wName=true thenget xOrgName of window wNameif it="" then get "The window ‚Äú"&wName&"‚Äù has not been saved."else get "Changes to ‚Äú"&wName&"‚Äù have not been saved."get line 1 of WindowScript("Saver",it&&" Save before closing?")if it="Save" then doSaveelse if it="" then return "Dont close!"end ifget the windowsrepeat with x=number of lines in it down to 9put line x of it into wNmif wsGet(wNm,"xOwnerID")=wID then close window wNmend repeatmenuSet "Go",wName,"NAME",""wsSet wName,"VISIBLE",FALSEput "" into gLastWdif bb="" thenbmPut ""end ifend ifend ouchBBon balloon4Item wNm,iglobal BB,PP,itemShown,typeShownget WindowScript("Balloon",wsGet(wNm,i,"Balloon"))if it‚â†"" thenwsSet wNm,i,"Balloon",line 2 to 99 of itif wNm=BB and i=itemShown and typeShown="Balloon"then set balloon_TEXT of window PP to line 2 to 99 of itend ifend balloon4Itemon Script4Item wNm,iglobal CR,gWindowput wNm into gWindowput wsGet(wNm,i,"ITEMTYPE") into iTypeput wsGet(wNm,i,"NAME") into nmput wsGet(wNm,i,"SCRIPT") into oldScriptif oldScript="" then put newScript(iType) into oldScriptput "xOwnerID: "&wsGet(wNm,"ID")&CR&"xOwnerName: "&nm ¬¨&CR&"xOwnerNumber: "&i&CR&"xOldScript: "&scrunch(oldScript) into initget WindowScript("Scripter"&CR&init,ScriptWdNm(wNm,iType,nm),oldScript,offset(return,oldScript))end Script4Itemfunction ScriptWdNm wNm,iType,nmreturn "Script of "&iType&&nm&&"of window"&&wNmend ScriptWdNmfunction confirmRef scrWdglobal gWindowput xOwnerNumber of window scrWd into oNumberput xOwnerName of window scrWd into oNameif wsGet(gWindow,oNumber,"NAME")=oName then return TRUEput wsGet(gWindow,oName,"NUMBER") into iif wsGet(gWindow,i,"ITEMTYPE")=word 3 of scrWd thenset xOwnerNumber of window scrWd to ireturn trueend ifget WindowScript("AnswerItem",wsGet(gWindow,"ITEMLIST"))if it="" then return falseelseset xOwnerNumber of window scrWd to (line 2 of it) - 1set xOwnerName of window scrWd to word 2 to 99 of line 3 of itget ScriptWdNm(gWindow,word 1 of line 3 of it,word 2 to 99 of line 3 of it)wsSet scrWd,"NAME",itmenuSet "Go",scrWd,TEXT,itreturn trueend ifend confirmRefon inOrOut pName,titleglobal gWindow,itemShown,typeShown,PP,eachIs,BB,WSSput BB into gWindowput title into eachIsput itemList of window gWindow into iListput wsGet(gWindow,pName) into oldOneif title="Param"then put "Param 1:‚óäName‚óäof‚óäWindow" into theListelse put "Line 1:‚óäName‚óäof‚óäClosingItem" into theListrepeat with i=1 to number of lines in oldOneset cursor to busyput line i of oldOne into theLineput offset("_",theLine) into del1put char 2 to del1-1 of theLine into iNoput char del1+1 to 9999 of theLine into propput return&eachIs&&i+1&":‚óä"&prop&"‚óäof‚óä"&(line iNo + 1 of iList)&"‚óä"&iNo after theListend repeatpush cdlock screenset lockmessages to truego stack WSSget WindowScript("Map",theList)pop cdunlock screenset lockmessages to falseif it="" then exit inOrOutput "" into newOnerepeat with i=3 to number of lines in itset cursor to busyput line i of it into theLineput "i"&GetItem(theLine,5,"‚óä")&"_"&GetItem(theLine,2,"‚óä")&return after newOneend repeatwsSet gWindow,pName,newOneif itemShown=0 and typeShown=pNamethen wsSet PP,pName,"TEXT",newOneend inOrOutfunction GetItem t,i,srepeat i-1 timesdelete char 1 to offset(s,t) of tend repeatget offset(s,t)if it>0 then return char 1 to it-1 of t else return tend GetItemon TextHit wID,wName,i,nm,vif i < 0 then doBBMenu nm,v,"TEXT"else if i=0 thenouchBB 0,wName,i,nm,vreturn the resultelse if i=1 then Dirtyend textHiton Dirtyglobal BBset xDirt of window bb to trueend Dirtyon BMHit wID,wName,i,nm,vif i < 0 then doBBMenu nm,v,"TEXT"else if i=0 then if v="CloseBox" thenwsSet wName,"VISIBLE",FALSEreturn "NG"end ifend BMHiton doInResglobal toStack,WSSput value of word 2 of long name of this stack into toStacklock screenset lockmessages to truepush cdgo stack WSSsend the params to this bgpop cdunlock screenset lockmessages to falseend doInReson mapHitssend the params to this bgend mapHitson getHitssend the params to this bgend getHitson setHitssend the params to this bgend setHits</script>
  17.     <background id="4516" file="background_4516.xml" name="" />
  18.     <card id="2128" file="card_2128.xml" marked="false" name="Splash" owner="4516" />
  19.     <card id="12307" file="card_12307.xml" marked="false" name="Installation" owner="4516" />
  20.     <card id="10756" file="card_10756.xml" marked="false" name="Index" owner="4516" />
  21.     <card id="11346" file="card_11346.xml" marked="false" name="¬†30 Second Expert" owner="4516" />
  22.     <card id="10623" file="card_10623.xml" marked="false" name="¬†Tools Palette" owner="4516" />
  23.     <card id="7837" file="card_7837.xml" marked="false" name="¬†Property Picker" owner="4516" />
  24.     <card id="11586" file="card_11586.xml" marked="false" name="¬†Big Message" owner="4516" />
  25.     <card id="2737" file="card_2737.xml" marked="false" name="¬†File" owner="4516" />
  26.     <card id="3587" file="card_3587.xml" marked="false" name="¬†Edit" owner="4516" />
  27.     <card id="2310" file="card_2310.xml" marked="false" name="¬†Go" owner="4516" />
  28.     <card id="3065" file="card_3065.xml" marked="false" name="¬†Tools" owner="4516" />
  29.     <card id="8452" file="card_8452.xml" marked="false" name="¬†Objects" owner="4516" />
  30.     <card id="6773" file="card_6773.xml" marked="false" name="¬†Font,Style,Color" owner="4516" />
  31.     <card id="9688" file="card_9688.xml" marked="false" name="¬†Property List" owner="4516" />
  32.     <card id="10369" file="card_10369.xml" marked="false" name="¬†Command List" owner="4516" />
  33. </stack>
  34.